﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace WCF
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IWCF
    {
        [OperationContract]
        PairComposite Add(PairComposite p1, PairComposite p2);
        [OperationContract]
        UserComposite GetUser(Guid ID);
        [OperationContract]
        bool AddUser(Guid UserID, string Username, string Image, string Firstname, string Lastname, string Gender, int Age, string Information);
    }


    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    [DataContract]
    public class PairComposite
    {
        [DataMember]
        public int first { get; set; }
        [DataMember]
        public int second { get; set; }
    }
    [DataContract]
    public class UserComposite
    {
        [DataMember]
        public Guid UserID { get; set; }
        [DataMember]
        public string Username { get; set; }
        [DataMember]
        public string Image { get; set; }
        [DataMember]
        public string Firstname { get; set; }
        [DataMember]
        public string Lastname { get; set; }
        [DataMember]
        public string Gender { get; set; }
        [DataMember]
        public int Age { get; set; }
        [DataMember]
        public string Information { get; set; }
    }

}
